Unique_Item_Requests: Es wird nur ein Zugriff gezählt, wenn beim Aufruf eines Artikels automatisch die HTML-Version geöffnet und anschließend das PDF des Artikels heruntergeladen wird.
---
title: "Nutzungsstatistiken 2020"
# author: "Jan Taubitz"
# contact: "jan.taubitz@charite.de"
output:
flexdashboard::flex_dashboard:
orientation: rows
vertical_layout: scroll
source_code: embed
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE,
message = FALSE,
warning = FALSE,
options(scipen = 999))
library(flexdashboard)
library(readxl)
library(tidyverse)
library(lubridate)
library(gt)
library(janitor)
library(scales)
#library(DT)
library(plotly)
library(gameofthrones)
library(RColorBrewer)
```
Dash {data-icon="fa-globe"}
=====================================
Row {data-height=250}
-----------------------------------------------------------------------
```{r}
# color pallettes for valueBoxes
pal <- got(20, option = "Jon_Snow", direction = 1)
pal <- str_sub(pal, end=-3)
```
###
```{r}
perc_change <- "+16 %"
valueBox(perc_change,
caption = "Suchen in Primo (im Vergleich zum Vorjahr 2019)",
icon = "fa-search-plus",
color = pal[17],
href = "#primo")
```
###
```{r}
perc_change <- "+31 %"
valueBox(perc_change,
caption = "Downloads aus E-Books von Springer (im Vergleich zum Vorjahr 2019)",
icon = "fa-book",
color = pal[20],
href = "#e-books")
```
###
```{r}
perc_change <- "-48 %"
valueBox(perc_change,
caption = "Ausleihen von Büchern (im Vergleich zum Vorjahr 2019)",
icon = "fa-book",
color = pal[12],
href="#ausleihen")
```
```{r eval=FALSE}
###
#Die Zahl bezieht sich auf die prozentuale Veränderung zum Vorjahr 2019.
```
Row {data-height=250}
-----------------------------------------------------------------------
###
```{r}
perc_change <- "+28 %"
valueBox(perc_change,
caption = "Besuche der Website (im Vergleich zum Vorjahr 2020)",
icon = "fa-user-check",
color = pal[19],
href = "#website")
```
###
```{r}
perc_change <- "+24 %"
valueBox(perc_change,
caption = "Downloads aus E-Journals von Springer (im Vergleich zum Vorjahr 2019)",
icon = "fa-file",
color = pal[18],
href = "#journals")
```
###
```{r}
perc_change <- "-59 %"
valueBox(perc_change,
caption = "Personenzähler CVK (im Vergleich zum Vorjahr 2019)",
icon = "fa-users",
color = pal[12],
href="#personenzähler")
```
Row {data-height=250}
-----------------------------------------------------------------------
###
```{r}
perc_change <- "+9 %"
valueBox(perc_change,
caption = "Downloads aus E-Journals von LWW (im Vergleich zum Vorjahr 2019)",
icon = "fa-file",
color = pal[15],
href = "#journals")
```
###
```{r}
```
###
```{r}
```
Primo {data-orientation=columns}
=====================================
Column {data-width=400, data-height=500}
-----------------------------------------------------------------------
### Primo: Anzahl Suchen von 2018 bis 2020
```{r}
Primo_Stat_Auswertungen <-
read_excel(
"T:/Statistik/ALMA_ART/Primo_Stat_Auswertungen.xlsx",
sheet = "R_1",
col_types = c("date",
"text", "numeric")
)
```
```{r}
Primo <- Primo_Stat_Auswertungen %>%
mutate(Year = year(Date)) %>%
group_by(Year, Action) %>%
summarise(Value = sum(Value))
```
```{r}
Primo_3 <- Primo %>%
summarise(Search_Total = sum(Value)) %>%
mutate(Percent_Change = (Search_Total / (lag(Search_Total)) - 1))
```
```{r}
pal <- got(2, option = "Jon_Snow", direction = 1)
p1 <- ggplot(Primo, aes(x = Year, y = Value)) +
geom_col(aes(fill = Action), position = "dodge") +
theme_classic() +
labs(
title = "",
subtitle = "",
fill = "Suchen",
y = "",
x = ""
) +
scale_fill_manual(values = pal) +
theme(legend.position = "bottom")
ggplotly(p1) %>%
layout(legend = list(orientation = "h", y = -0.1))
```
```{r eval=FALSE}
#Column {data-width=200, data-height=200}
#-----------------------------------------------------------------------
### Primo B
Primo_2 <- Primo %>%
spread(key = Year, value = Value) %>%
adorn_totals("row")
gt(Primo_3) %>%
tab_header(title = md("Suchen in Primo"))
```
Website {data-orientation=columns}
=====================================
Column
-----------------------------------------------------------------------
### Website: Besuche und Seitenansichten 2018 bis 2020
```{r}
Website_Besuche <- read_excel(
"T:/Statistik/ALMA_ART/Website.xlsx",
sheet = "Besuche",
col_types = c("numeric",
"text", "numeric")
)
```
```{r}
Website_Besuche_2 <- Website_Besuche %>%
group_by(Action) %>%
# filter(Action == "Besuche") %>%
mutate(Percent_Change = (Value / (lag(Value)) - 1))
```
```{r}
pal <- got(2, option = "Jon_Snow", direction = 1)
p1 <- ggplot(Website_Besuche, aes(x = Date, y = Value)) +
geom_col(aes(fill = Action), position = "dodge") +
theme_classic() +
scale_fill_manual(values = pal) +
labs(title = "",
fill = "",
y = "",
x = "")
ggplotly(p1)
```
### Website: Verwendung Betriebssysteme 2020
```{r}
Website_OS <- read_excel(
"T:/Statistik/ALMA_ART/Website.xlsx",
sheet = "Desktop",
col_types = c("text", "text", "numeric")
)
```
```{r}
pal <- got(3, option = "Jon_Snow", direction = -1)
p1 <- Website_OS %>%
filter(date == "2020") %>%
plot_ly(marker = list(colors = pal)) %>%
add_pie(labels = Website_OS$action,
values = Website_OS$value,
hole = 0.6) %>%
layout(title = "")
p1
```
Column
-----------------------------------------------------------------------
### Website: Besuche 2018 bis 2020
```{r}
Website_Users <- read_excel(
"T:/Statistik/ALMA_ART/Website.xlsx",
sheet = "Users",
col_types = c("date", "numeric", "numeric")
)
pal <- got(3, option = "Jon_Snow", direction = 1)
```
```{r}
Website_Users_2 <- Website_Users %>%
mutate(month = as.factor(month(date, label = T, abb = T))) %>%
mutate(year = as.factor(year(date)))
p2 <-
ggplot(Website_Users_2, aes(x = month, y = visits, color = year)) +
geom_point(size = 2) +
geom_line(aes(x = month, y = visits, group = year), size = 1) +
theme(axis.text.x = element_text(angle = 90)) +
# scale_x_datetime(date_labels = "%b %Y", date_breaks = "2 month")+
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_color_manual(values = pal) +
labs(
title = "",
y = "Besuche",
x = "",
color = ""
)
ggplotly(p2)
```
### Website: Unique Users 2018 bis 2020
```{r}
Website_Users_2 <- Website_Users %>%
mutate(month = as.factor(month(date, label = T, abb = T))) %>%
mutate(year = as.factor(year(date)))
p1 <-
ggplot(Website_Users_2, aes(x = month, y = unique_users, color = year)) +
geom_point(size = 2) +
geom_line(aes(x = month, y = unique_users, group = year), size = 1) +
theme(axis.text.x = element_text(angle = 90)) +
# scale_x_datetime(date_labels = "%b %Y", date_breaks = "2 month")+
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_color_manual(values = pal) +
labs(
title = "",
y = "Unique Users",
x = "",
color = ""
)
ggplotly(p1)
```
E-Books {data-orientation=columns}
=====================================
Column {data-width=400, data-height=500}
-----------------------------------------------------------------------
```{r}
Elsevier_2019_20_Books <- read.csv("T:/Statistik/ALMA_ART/Rohdaten_E_Books/Elsevier/Elsevier_2019_2020_TR_B1.csv", header = T, skip = 13, sep = ",")
```
```{r}
Springer_2019_20_Books <- read.csv("T:/Statistik/ALMA_ART/Rohdaten_E_Books/Springer/Springer_2019_2020_TR_B1.csv", header = T, skip = 13, sep = ",")
```
```{r}
Elsevier <- Elsevier_2019_20_Books %>%
group_by(Metric_Type) %>%
summarise_at(vars(Jan.2019:Dec.2020), sum) %>%
filter(Metric_Type == "Unique_Title_Requests") %>%
select(-1) %>%
gather() %>%
mutate(publisher = "Elsevier") %>%
mutate(date = my(key)) %>%
mutate(month = as.factor(month(date, label = T, abb = T))) %>%
mutate(year = as.factor(year(date)))
```
```{r}
Springer <- Springer_2019_20_Books %>%
group_by(Metric_Type) %>%
summarise_at(vars(Jan.2019:Dec.2020), sum) %>%
filter(Metric_Type == "Unique_Title_Requests") %>%
select(-1) %>%
gather() %>%
mutate(date = my(key)) %>%
mutate(month = as.factor(month(date, label = T, abb = T))) %>%
mutate(year = as.factor(year(date)))
```
### **Elsevier E-Books Unique Title Requests (TR_B1) 2019 und 2020**
```{r}
pal <- got(2, option = "Jon_Snow", direction = 1)
p1 <-
ggplot(Elsevier, aes(x = month, y = value, color = year)) +
geom_point(size = 2) +
geom_line(aes(x = month, y = value, group = year), size = 1) +
theme(axis.text.x = element_text(angle = 90)) +
# scale_x_datetime(date_labels = "%b %Y", date_breaks = "2 month")+
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_color_manual(values = pal) +
# ylim(0, NA) +
labs(
title = "",
y = "Unique Title Requests",
x = "",
color = ""
)
ggplotly(p1)
```
Column {data-width=400, data-height=500}
-----------------------------------------------------------------------
### **Springer E-Books Unique Title Requests (TR_B1) 2019 und 2020**
```{r}
pal <- got(2, option = "Jon_Snow", direction = 1)
p1 <-
ggplot(Springer, aes(x = month, y = value, color = year)) +
geom_point(size = 2) +
geom_line(aes(x = month, y = value, group = year), size = 1) +
theme(axis.text.x = element_text(angle = 90)) +
# scale_x_datetime(date_labels = "%b %Y", date_breaks = "2 month")+
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_color_manual(values = pal) +
# ylim(0, NA) +
labs(
title = "",
y = "Unique Title Requests",
x = "",
color = ""
)
ggplotly(p1)
```
```{r eval=FALSE}
Springer %>%
group_by(year) %>%
summarise(value = sum(value)) %>%
mutate(percent_change = (value / (lag(value)) - 1))
```
Journals
=====================================
Row {data-height=600, .tabset}
-----------------------------------------------------------------------
### **Unique Item Requests (TR_J1) 2020 im Vergleich zum Vorjahr in Prozent**
```{r}
Springer_2019_20 <- read.csv("T:/Statistik/ALMA_ART/Rohdaten_Springer/Springer_counter5_tr_j1_2019-01-2020-12.csv", header = T, skip = 13, sep = ",")
```
```{r}
LWW_2019_20 <- read.csv("T:/Statistik/ALMA_ART/Rohdaten_Journals/LWW/LWW_2019_2020_TR_J1.csv", header = T, skip = 13, sep = ",")
```
```{r}
LWW_2019_20_J3 <- read.csv("T:/Statistik/ALMA_ART/Rohdaten_Journals/LWW/LWW_2019_2020_TR_J3.csv", header = T, skip = 13, sep = ",")
```
```{r}
Highwire_2019_20 <- read.csv("T:/Statistik/ALMA_ART/Rohdaten_Journals/Highwire/Highwire_2019_2020_TR_J1.csv", header = T, skip = 13, sep = ",")
```
```{r}
Elsevier_2019_20 <- read.csv("T:/Statistik/ALMA_ART/Rohdaten_Journals/Elsevier/Elsevier_2019_2020_TR_J1.csv", header = T, skip = 13, sep = ",")
```
```{r}
Wiley_2019_20 <- read.table("T:/Statistik/ALMA_ART/Rohdaten_Journals/Wiley/Wiley_2019_2020_TR_J1.tsv", sep = '\t', header = TRUE, skip = 13)
```
```{r}
NEJM_2019_20 <- read.table("T:/Statistik/ALMA_ART/Rohdaten_Journals/NEJM/NEJM_2019_2020_TR_J1.tsv", sep = '\t', header = TRUE, skip = 13)
```
```{r}
Elsevier <- Elsevier_2019_20 %>%
group_by(Metric_Type) %>%
summarise_at(vars(Jan.2019:Dec.2020), sum) %>%
filter(Metric_Type == "Unique_Item_Requests") %>%
select(-1) %>%
gather() %>%
mutate(publisher = "Elsevier") %>%
mutate(date = my(key)) %>%
mutate(month = as.factor(month(date, label = T, abb = T))) %>%
mutate(year = as.factor(year(date)))
```
```{r}
LWW <- LWW_2019_20 %>%
group_by(Publisher, Metric_Type) %>%
summarise_at(vars(Jan.2019:Dec.2020), sum) %>%
filter(Metric_Type == "Unique_Item_Requests") %>%
filter(Publisher == "Lippincott Williams & Wilkins (LWW)") %>%
ungroup() %>%
select(-1, -2) %>%
gather() %>%
mutate(publisher = "LWW") %>%
mutate(date = my(key)) %>%
mutate(month = as.factor(month(date, label = T, abb = T))) %>%
mutate(year = as.factor(year(date)))
```
```{r}
Highwire <- Highwire_2019_20 %>%
mutate(across(everything(), ~replace_na(.x, 0))) %>%
group_by(Metric_Type) %>%
summarise_at(vars(Jan.2019:Dec.2020), sum) %>%
filter(Metric_Type == "Unique_Item_Requests") %>%
select(-1) %>%
gather() %>%
mutate(publisher = "HighWire") %>%
mutate(date = my(key)) %>%
mutate(month = as.factor(month(date, label = T, abb = T))) %>%
mutate(year = as.factor(year(date)))
```
```{r}
NEJM <- NEJM_2019_20 %>%
group_by(Metric_Type) %>%
summarise_at(vars(Jan.2019:Dec.2020), sum) %>%
filter(Metric_Type == "Unique_Item_Requests") %>%
select(-1) %>%
gather() %>%
mutate(publisher = "NEJM") %>%
mutate(date = my(key)) %>%
mutate(month = as.factor(month(date, label = T, abb = T))) %>%
mutate(year = as.factor(year(date)))
```
```{r}
Springer <- Springer_2019_20 %>%
group_by(Metric_Type) %>%
summarise_at(vars(Jan.2019:Dec.2020), sum) %>%
filter(Metric_Type == "Unique_Item_Requests") %>%
select(-1) %>%
gather() %>%
mutate(publisher = "Springer") %>%
mutate(date = my(key)) %>%
mutate(month = as.factor(month(date, label = T, abb = T))) %>%
mutate(year = as.factor(year(date)))
```
```{r}
Wiley <- Wiley_2019_20 %>%
group_by(Metric_Type) %>%
summarise_at(vars(Jan.2019:Dec.2020), sum) %>%
filter(Metric_Type == "Unique_Item_Requests") %>%
select(-1) %>%
gather() %>%
mutate(publisher = "Wiley") %>%
mutate(date = my(key)) %>%
mutate(month = as.factor(month(date, label = T, abb = T))) %>%
mutate(year = as.factor(year(date)))
```
```{r}
Journals <- bind_rows(Elsevier, Highwire, LWW, NEJM, Springer, Wiley)
```
```{r}
Journals_Perc <- Journals %>%
group_by(publisher, month) %>%
arrange(month, year) %>%
mutate(percent_change = (value / (lag(value)) - 1)) %>%
filter(year == 2020) %>%
select(-1,-2)
publisher_uniq <- unique(Journals$publisher)
```
```{r eval=FALSE}
Journals_Perc %>%
group_by(year) %>%
summarise(mean = mean(percent_change))
```
```{r}
pal <- got(length(publisher_uniq), option = "Jon_Snow", direction = 1)
p1 <-
ggplot(Journals_Perc,
aes(x = month, y = percent_change, color = publisher)) +
geom_point(size = 2) +
geom_line(aes(x = month, y = percent_change, group = publisher), size = 1) +
geom_hline(yintercept = 0,
linetype = "dashed",
alpha = 0.8) +
theme(axis.text.x = element_text(angle = 90)) +
# scale_x_datetime(date_labels = "%b %Y", date_breaks = "2 month")+
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_color_manual(values = pal) +
# ylim(0, NA) +
labs(
title = "",
y = "Veränderung in Prozent",
x = "",
color = ""
)
ggplotly(p1)
```
### **Unique Item Requests (TR_J1) 2019 und 2020**
```{r}
pal <- got(length(publisher_uniq), option = "Jon_Snow", direction = 1)
p1 <-
ggplot(Journals, aes(x = month, y = value, color = publisher)) +
geom_point(size = 2) +
geom_line(aes(x = month, y = value, group = publisher), size = 1) +
theme(axis.text.x = element_text(angle = 90)) +
# scale_x_datetime(date_labels = "%b %Y", date_breaks = "2 month")+
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_color_manual(values = pal) +
ylim(0, NA) +
labs(
title = "",
y = "Unique Item Requests",
x = "",
color = ""
) +
facet_wrap(~year)
ggplotly(p1)
```
### **Definition Unique Item Requests (TR_J1)**
Unique_Item_Requests: Es wird nur ein Zugriff gezählt, wenn beim Aufruf eines Artikels automatisch die HTML-Version geöffnet und anschließend das PDF des Artikels heruntergeladen wird.
[Weitere Informationen zu den Metriken von COUNTER 5](http://www.bib-bvb.de/documents/11183/10148261/COUNTER-5_Zusammenstellung_KER_2020-01.pdf/bfaa960a-30ed-4429-9a99-1328a0598c44)
Row
-----------------------------------------------------------------------
### **Elsevier Journals Unique Item Requests (TR_J1) 2019 und 2020**
```{r}
pal <- got(2, option = "Jon_Snow", direction = 1)
p1 <-
ggplot(Elsevier, aes(x = month, y = value, color = year)) +
geom_point(size = 2) +
geom_line(aes(x = month, y = value, group = year), size = 1) +
theme(axis.text.x = element_text(angle = 90)) +
# scale_x_datetime(date_labels = "%b %Y", date_breaks = "2 month")+
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_color_manual(values = pal) +
# ylim(0, NA) +
labs(
title = "",
y = "Unique Item Requests",
x = "",
color = ""
)
ggplotly(p1)
```
### **HighWire Journals Unique Item Requests (TR_J1) 2019 und 2020**
```{r}
pal <- got(2, option = "Jon_Snow", direction = 1)
p1 <-
ggplot(Highwire, aes(x = month, y = value, color = year)) +
geom_point(size = 2) +
geom_line(aes(x = month, y = value, group = year), size = 1) +
theme(axis.text.x = element_text(angle = 90)) +
# scale_x_datetime(date_labels = "%b %Y", date_breaks = "2 month")+
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_color_manual(values = pal) +
# ylim(0, NA) +
labs(
title = "",
y = "Unique Item Requests",
x = "",
color = ""
)
ggplotly(p1)
```
Row
-----------------------------------------------------------------------
### **LWW Journals Unique Item Requests (TR_J1) 2019 und 2020**
```{r}
pal <- got(2, option = "Jon_Snow", direction = 1)
p1 <-
ggplot(LWW, aes(x = month, y = value, color = year)) +
geom_point(size = 2) +
geom_line(aes(x = month, y = value, group = year), size = 1) +
theme(axis.text.x = element_text(angle = 90)) +
# scale_x_datetime(date_labels = "%b %Y", date_breaks = "2 month")+
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_color_manual(values = pal) +
# ylim(0, NA) +
labs(
title = "",
y = "Unique Item Requests",
x = "",
color = ""
)
ggplotly(p1)
```
### **NEJM Journals Unique Item Requests (TR_J1) 2019 und 2020**
```{r}
pal <- got(2, option = "Jon_Snow", direction = 1)
p1 <-
ggplot(NEJM, aes(x = month, y = value, color = year)) +
geom_point(size = 2) +
geom_line(aes(x = month, y = value, group = year), size = 1) +
theme(axis.text.x = element_text(angle = 90)) +
# scale_x_datetime(date_labels = "%b %Y", date_breaks = "2 month")+
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_color_manual(values = pal) +
# ylim(0, NA) +
labs(
title = "",
y = "Unique Item Requests",
x = "",
color = ""
)
ggplotly(p1)
```
Row
-----------------------------------------------------------------------
### **Springer Journals Unique Item Requests (TR_J1) 2019 und 2020**
```{r}
pal <- got(2, option = "Jon_Snow", direction = 1)
p1 <-
ggplot(Springer, aes(x = month, y = value, color = year)) +
geom_point(size = 2) +
geom_line(aes(x = month, y = value, group = year), size = 1) +
theme(axis.text.x = element_text(angle = 90)) +
# scale_x_datetime(date_labels = "%b %Y", date_breaks = "2 month")+
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_color_manual(values = pal) +
# ylim(0, NA) +
labs(
title = "",
y = "Unique Item Requests",
x = "",
color = ""
)
ggplotly(p1)
```
### **Wiley Journals Unique Item Requests (TR_J1) 2019 und 2020**
```{r}
pal <- got(2, option = "Jon_Snow", direction = 1)
p1 <-
ggplot(Wiley, aes(x = month, y = value, color = year)) +
geom_point(size = 2) +
geom_line(aes(x = month, y = value, group = year), size = 1) +
theme(axis.text.x = element_text(angle = 90)) +
# scale_x_datetime(date_labels = "%b %Y", date_breaks = "2 month")+
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_color_manual(values = pal) +
# ylim(0, NA) +
labs(
title = "",
y = "Unique Item Requests",
x = "",
color = ""
)
ggplotly(p1)
```
```{r eval=FALSE}
Springer %>%
group_by(year) %>%
summarise(value = sum(value)) %>%
mutate(percent_change = (value / (lag(value)) - 1))
```
```{r eval=FALSE}
LWW %>%
group_by(year) %>%
summarise(value = sum(value)) %>%
mutate(percent_change = (value / (lag(value)) - 1))
```
```{r eval=FALSE}
Journals %>%
group_by(year) %>%
summarise(value = sum(value)) %>%
mutate(percent_change = (value / (lag(value)) - 1))
```
Ausleihen {data-orientation=columns}
=====================================
Column {data-width=400, data-height=400}
-----------------------------------------------------------------------
### Ausleihen (inkl. Verl.) nach Standorten 2019 und 2020
```{r eval=FALSE}
Ausleihen <- read_excel(
"T:/Statistik/ALMA_ART/Ausleihen.xlsx",
sheet = "Ausleihen_R",
col_types = c("text",
"numeric", "numeric", "numeric",
"numeric"),
na = "NA"
)
```
```{r eval=FALSE}
pal <- got(12, option = "Jon_Snow", direction = -1)
p1 <-
ggplot(Ausleihen, aes(x = Jahr, y = Ausleihen_u_Verl)) +
geom_col(fill = pal[1]) +
theme(axis.text.x = element_text(angle = 90)) +
# scale_x_datetime(date_labels = "%b %Y", date_breaks = "2 month")+
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(
title = "Ausleihen (inkl. Verl.) alle Standorte 2007 bis 2020",
y = "Ausleihen",
x = "",
color = ""
)
ggplotly(p1)
```
```{r eval=FALSE}
Ausleihen %>%
mutate(Percent_Change = (Ausleihen_u_Verl / (lag(Ausleihen_u_Verl)) -
1))
```
```{r}
Ausleihen <- read_excel(
"T:/Statistik/ALMA_ART/Ausl_Verl.xlsx",
sheet = "Tabelle1",
col_types = c("text",
"text", "numeric", "numeric",
"numeric", "numeric"),
na = "NA"
)
```
```{r}
Ausleihen <- Ausleihen %>%
mutate(Ausl_Verl = Ausleihen + Verlängerungen) %>%
mutate(Bibliothek = factor(Bibliothek, levels = c("CVK", "CCM", "ZMK"))) %>%
mutate(Monat = as.factor(month(Monat, label = T, abb = T)))
```
```{r}
pal <- got(3, option = "Jon_Snow", direction = -1)
p1 <-
ggplot(Ausleihen, aes(x = Monat, y = Ausl_Verl, color = Bibliothek)) +
geom_point(size = 2) +
geom_line(aes(x = Monat, y = Ausl_Verl, group = Bibliothek), size = 1) +
theme(axis.text.x = element_text(angle = 90)) +
# scale_x_datetime(date_labels = "%b %Y", date_breaks = "2 month")+
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_color_manual(values = pal) +
ylim(0, NA) +
labs(
title = "",
y = "",
x = "",
color = ""
) +
facet_wrap(~Jahr)
ggplotly(p1)
```
```{r eval=FALSE}
Ausleihen %>%
group_by(Jahr) %>%
summarise(Ausl_Verl = sum(Ausl_Verl)) %>%
mutate(Percent_Change = (Ausl_Verl / (lag(Ausl_Verl)) -
1))
```
Personenzähler {data-orientation=columns}
=====================================
Column {data-width=400, data-height=400}
-----------------------------------------------------------------------
### Personenzähler CVK 2018 bis 2020
```{r}
Lesesaal <- read_excel(
"T:/Statistik/ALMA_ART/Lesesaal.xlsx",
sheet = "Tabelle1",
col_types = c("date",
"numeric"),
na = "NA"
)
Lesesaal_2 <- Lesesaal %>%
mutate(month = as.factor(month(Date, label = T, abb = T))) %>%
mutate(year = as.factor(year(Date)))
pal <- got(3, option = "Jon_Snow", direction = 1)
p1 <-
ggplot(Lesesaal_2, aes(x = month, y = Value, color = year)) +
geom_point(size = 2) +
geom_line(aes(x = month, y = Value, group = year), size = 1) +
theme(axis.text.x = element_text(angle = 90)) +
# scale_x_datetime(date_labels = "%b %Y", date_breaks = "2 month")+
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
scale_color_manual(values = pal) +
labs(
title = "",
y = "Personenzähler",
x = "",
color = ""
)
ggplotly(p1)
```
```{r eval=FALSE}
Lesesaal_2 %>%
group_by(year) %>%
summarise(Value = sum(Value)) %>%
mutate(percent_change = (Value / (lag(Value)) - 1))
```